package com.ruoyi.common.core.query;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.bind.DefaultValue;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author songpin566
 * @date 2023/09/14
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "表格分页信息")
public class TablePageQuery {

        @ApiModelProperty(value = "页码")
        @NotNull(message = "页码不能为空")
        @Min(value = 1, message = "页码参数错误")
        private Integer pageNum;

        @ApiModelProperty(value = "每页显示的条数")
        @NotNull(message = "每页显示的数量不能为空")
        @Min(value = 1, message = "每页显示的数量参数错误")
        private Integer pageSize;

        @ApiModelProperty(value = "排序方式(asc:升序, desc:倒序)")
        private String isAsc;

        @ApiModelProperty(value = "排序列名(createTime)")
        private String orderByColumn;

}
